from functools import reduce

list1 = [1,2,3,4]
def add(x,y):
    return x+y

print(reduce(add,list1))


list2 = [1,"2",{3:"hhh"}]
print(list2)


dict1 = {"wang":19,"zhang":18,"li":20}
print(sorted(dict1,key=lambda x:x[1]))